home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / games / 45 / undelete.doc < prev    next >
Text File  |  1987-02-12  |  6KB  |  199 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                           U N D E L E T E  User Notes
  7.  
  8.          The ST directory structure
  9.  
  10.               Skip this part if you like, but be advised that UNDELETE
  11.          will not always be able to recover your deleted file. This
  12.          section will help you to understand why.
  13.  
  14.               In order to keep track of the files and folders on a
  15.          disk, TOS records two sets of data. The directory itself
  16.          records the filename (or folder name), the time and date of
  17.          creation or modification, the file length, several
  18.          special-purpose flags (for example, 'read only'), and the
  19.          location of the first 'cluster' belonging to the file. On the
  20.          ST a cluster is an adjacent pair of sectors, 1024 bytes.
  21.  
  22.               A second set of data, the File Allocation Table or FAT,
  23.          has an entry for each cluster indicating if it is in use, and
  24.          if so, where to find the next cluster of this file, or
  25.          whether this is the end-of-file cluster.
  26.  
  27.               When TOS deletes a file, it does not erase the data in
  28.          the file. Instead, it indicates that the file has been erased
  29.          by replacing the first character of the file name with $E5
  30.          (i. e., decimal 229). It also modifies the File Allocation
  31.          Table to indicate that the clusters previously belonging to
  32.          the file are now available. It does this by writing a zero in
  33.          the element corresponding to a particular cluster.
  34.  
  35.               When a new file is created, the first available
  36.          directory entry is used; this entry may have been previously
  37.          used by a file that has been deleted, or it may be an entry
  38.          that has never been used since the disk was last formatted --
  39.          if there are no '$E5' flags showing. Similarly, the newly
  40.          created file (or, for that matter, a file which is being
  41.          rewritten, and now requires additional clusters) uses the
  42.          first available (empty -- showing '0') cluster, again
  43.          possibly re-using clusters belonging to, and still retaining
  44.          data from, an erased file.
  45.  
  46.               Usually, if a single file has been erased, and no new
  47.          file has been written (including modified files), it is
  48.          possible to reconstruct the directory and FAT tables
  49.          unamiguously. However, if several files have been deleted,
  50.          proper reconstruction may not be possible, since their
  51.          clusters may be intermixed in an unknown way. And if write
  52.          activity has taken place on the disk since the deletion, it
  53.          is unlikely that the file can be recovered, since its
  54.          directory entry probably no longer exists.
  55.  
  56.  
  57.          How to use Undelete
  58.  
  59.               Before going any further, I must repeat the warning that
  60.          appears on the opening screen of Undelete: ONLY USE UNDELETE
  61.  
  62.  
  63.  
  64.                                       -1-
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.          ON A DUPLICATE OF YOUR DISK. If you use the normal TOS
  73.          function to copy the entire disk (not individual files), you
  74.          will have a copy of all of the necessary information for
  75.          Undelete to work without putting your original disk at risk.
  76.  
  77.               Also, Undelete works only in medium resolution, and
  78.          expects to find the subject disk in Drive A:, so set up your
  79.          ST accordingly.
  80.  
  81.               Load UNDELETE.PRG, and place your (duplicate) disk in
  82.          Drive A. After clicking the OK box on the opening screen,
  83.          select Undelete from the Function menu. A first-level (root)
  84.          directory will be displayed and will show:
  85.  
  86.                 1. Any deleted files which are still in the root
  87.          directory, and
  88.                 2. All folders in the root directory, deleted or
  89.          otherwise (deleted folders will show up with a '#' in the
  90.          first character).
  91.  
  92.               Selecting a deleted file or folder displays a dialog box
  93.          requesting the initial character (which has been replaced by
  94.          the $E5 'delete flag'). After inserting the initial
  95.          character, selecting 'Recover' recovers the file or folder.
  96.          Selecting 'Cancel' will return you to the display of deleted
  97.          files.
  98.  
  99.               Selecting a non-deleted folder 'opens' the folder,
  100.          showing all folders and all deleted files at the next level
  101.          within the folder. You may then continue as with the root
  102.          directory.
  103.  
  104.               The 'close' box on the window will always back up the
  105.          program by one stage. For example, if a folder is open, the
  106.          folder will be closed and the directory which included the
  107.          folder will be displayed. At the root directory, the close
  108.          box backs out of the undelete function so that no function is
  109.          selected. Selecting the close box again terminates the
  110.          program.
  111.  
  112.  
  113.          Additional functions.
  114.  
  115.               Since many of the same program procedures are required,
  116.          a simple directory function is a part of the program. It
  117.          opens and closes folders in exactly the same way as the
  118.          undelete function.
  119.  
  120.               A print function prints whatever directory is presently
  121.          on the screen. This works as a subfunction under both the
  122.          directory function and the undelete function.
  123.  
  124.               A cancel function is also available; it immediately
  125.          terminates the directory or undelete function without
  126.          terminating the program, and without having to back out of
  127.  
  128.  
  129.  
  130.                                       -2-
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.          several levels of subdirectories (folders) via the close box.
  139.          The File Allocation Table (FAT) is read only on initial
  140.          selection of one of the functions -- undelete or directory --
  141.          so a function should be canceled before using it to operate
  142.          on a new disk.
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                       -3-
  197.  
  198.  
  199.